<div class="sidebar" id="sidebar">
    <ul class="nav nav-list">
        {volist name='menu' id='v'}
            {eq name='v.display' value='1'}
                <li class="{if condition='($v.id eq $active.id) and ($v.pid eq 0)'}active{/if}{eq name='v.id' value='$active.pid'}active open{/eq}">
                    <a href="{:url($v['url'])}" class="dropdown-toggle">
                        <i class="{$v.icon}"></i>
                        <span class="menu-text"> {$v.title} </span>
                        {present name="v['children']"}<b class="arrow icon-angle-down"></b>{/present}
                    </a>
                    {present name="v['children']"}
                    <ul class="submenu">
                        {volist name='v.children' id='vv'}
                        {eq name='vv.display' value='1'}
                        <li class="{if condition='($vv.id eq $active.id) or ($vv.id eq $active.pid)'}active{/if}">
                            <a href="{:url($vv['url'])}" class="dropdown-toggle">
                                <i class="icon-list"></i>
                                {$vv.title}
                            </a>
                        </li>
                        {/eq}
                        {/volist}
                    </ul>
                    {/present}
                </li>
            {/eq}
        {/volist}
    </ul>

    <div class="sidebar-collapse" id="sidebar-collapse">
        <i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
    </div>

    <script type="text/javascript">
        try {
            ace.settings.check('sidebar', 'collapsed')
        } catch (e) {
        }
    </script>
</div>